package com.crois.barrier.admin.mapstruct;

import com.crois.barrier.admin.dto.ApiRouteInfoDto;
import com.crois.barrier.admin.entity.ApiRouteInfo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
* barrier api路由信息实体互转
*
* @author Hou Ze Yu
* @version 1.0
* @date 2021-10-25 11:58:25
**/
@Mapper
public interface ApiRouteInfoDtoEntityMapper {

    ApiRouteInfoDtoEntityMapper INSTANCE = Mappers.getMapper(ApiRouteInfoDtoEntityMapper.class);

    /**
     * barrier api路由信息 Dto
     * @param apiRouteInfo barrier api路由信息实体
     * @return barrier api路由信息Dto
     */
    ApiRouteInfoDto toApiRouteInfoDto(ApiRouteInfo apiRouteInfo);

    /**
     * barrier api路由信息dto转换成实体
     * @param apiRouteInfoDto barrier api路由信息Dto
     * @return barrier api路由信息实体
     */
    ApiRouteInfo toApiRouteInfoEntity(ApiRouteInfoDto apiRouteInfoDto);

    /**
     * barrier api路由信息实体集合转换成dto集合
     * @param apiRouteInfoList barrier api路由信息实体集合
     * @return barrier api路由信息dto集合
     */
    List<ApiRouteInfoDto> toApiRouteInfoDtoList(List<ApiRouteInfo> apiRouteInfoList);
}
